package cn.cs.client;

import cn.cs.config.CsConfiguration;
import cn.cs.fallback.ExpensesExplainFallBack;
import cn.cs.fallback.UserAddressFallBack;
import cn.cs.pojo.ExpensesExplain;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * Created by yuexl
 */
@FeignClient(name = "cs-user-provider", configuration = CsConfiguration.class, fallback = ExpensesExplainFallBack.class)
public interface ExpensesExplainClient {

    @RequestMapping(value = "/getExpensesExplainById", method = RequestMethod.POST)
    public ExpensesExplain getExpensesExplainById(@RequestParam("id") String id) throws Exception;

    @RequestMapping(value = "/getExpensesExplainListByMap", method = RequestMethod.POST)
    public List<ExpensesExplain> getExpensesExplainListByMap(@RequestBody Map<String, Object> param) throws Exception;

    @RequestMapping(value = "/getExpensesExplainCountByMap", method = RequestMethod.POST)
    public Integer getExpensesExplainCountByMap(@RequestBody Map<String, Object> param) throws Exception;

    @RequestMapping(value = "/addExpensesExplain", method = RequestMethod.POST)
    public Integer addExpensesExplain(@RequestBody ExpensesExplain expensesExplain) throws Exception;

    @RequestMapping(value = "/modifyExpensesExplain", method = RequestMethod.POST)
    public Integer modifyExpensesExplain(@RequestBody ExpensesExplain expensesExplain) throws Exception;

    @RequestMapping(value = "/deleteExpensesExplainById", method = RequestMethod.POST)
    public Integer deleteExpensesExplainById(@RequestParam("id") String id) throws Exception;

    @RequestMapping(value = "/getAreaById", method = RequestMethod.POST)
    public Map<String, Object> getAreaById(@RequestParam("id") String id) throws Exception;

    @RequestMapping(value = "/getFaultTypeById", method = RequestMethod.POST)
    public Map<String, Object> getFaultTypeById(@RequestParam("id") String id) throws Exception;


}

